<?php
/*
 * @Author: lokei
 * @Date: 2022-09-28 20:55:13
 * @LastEditors: lokei
 * @LastEditTime: 2022-10-24 09:00:26
 * @Description: 
 */
$router->group(['prefix' => env('ROUTER_PREFIX') . 'api'], function () use ($router) {
	
	
	/**Iot */
	// Device设备
	$router->group(['prefix' => 'iot/device'], function () use ($router) {
		// 模板列表
		$router->get('list', [
			'as' => 'list', 'uses' => '\App\Http\Controllers\Iot\Device\DeviceController@list'
		]);
		$router->get('ofSim', [
			'as' => 'ofSim', 'uses' => '\App\Http\Controllers\Iot\Device\DeviceController@ofSim'
		]);
		$router->get('get', [
			'as' => 'get', 'uses' => '\App\Http\Controllers\Iot\Device\DeviceController@get'
		]);
		$router->post('create', [
			'as' => 'create', 'uses' => '\App\Http\Controllers\Iot\Device\DeviceController@create'
		]);
		$router->post('update', [
			'as' => 'update', 'uses' => '\App\Http\Controllers\Iot\Device\DeviceController@update'
		]);
		$router->post('setGateway', [
			'as' => 'setGateway', 'uses' => '\App\Http\Controllers\Iot\Device\DeviceController@setGateway'
		]);
		$router->post('delete', [
			'as' => 'delete', 'uses' => '\App\Http\Controllers\Iot\Device\DeviceController@delete'
		]);
		
	});

	// 网关设备
	$router->group(['prefix' => 'iot/gateway'], function () use ($router) {
		$router->get('list', [
			'as' => 'list', 'uses' => '\App\Http\Controllers\Iot\Gateway\GatewayController@list'
		]);
		$router->get('get', [
			'as' => 'get', 'uses' => '\App\Http\Controllers\Iot\Gateway\GatewayController@get'
		]);
		$router->post('create', [
			'as' => 'create', 'uses' => '\App\Http\Controllers\Iot\Gateway\GatewayController@create'
		]);
		$router->post('update', [
			'as' => 'update', 'uses' => '\App\Http\Controllers\Iot\Gateway\GatewayController@update'
		]);
		$router->post('delete', [
			'as' => 'delete', 'uses' => '\App\Http\Controllers\Iot\Gateway\GatewayController@delete'
		]);
		
	});

	// PC
	$router->group(['prefix' => 'iot/pc'], function () use ($router) {
		// 锁屏
		$router->post('lock', [
			'as' => 'lockPc', 'uses' => '\App\Http\Controllers\Iot\Device\PCController@lock'
		]);
		$router->post('unlock', [
			'as' => 'unlockPc', 'uses' => '\App\Http\Controllers\Iot\Device\PCController@unlock'
		]);
	});
	
});
